package love.yuanmengrobot.zframe.mvc;
/*
 *   @Studio:CHJY · 源梦科技
 *   @Author:CHJY创幻
 *   @Ide:IntelliJ IDEA
 *   @Creation time:2021/7/3 16:59
 */

import java.lang.reflect.Method;

public class ControllerMapping {//一个存储器，存储controller类与类里面包含的方法
    //controller与之包含的方法
    private Class<?> controllerClass;
    private Method handleMethod;//一个方法类

    //构造
    public ControllerMapping() {
    }

    public ControllerMapping(Class<?> controllerClass, Method handleMethod) {
        this.controllerClass = controllerClass;
        this.handleMethod = handleMethod;
    }

    //get、set、tostring


    public Class<?> getControllerClass() {
        return controllerClass;
    }

    public void setControllerClass(Class<?> controllerClass) {
        this.controllerClass = controllerClass;
    }

    public Method getHandleMethod() {
        return handleMethod;
    }

    public void setHandleMethod(Method handleMethod) {
        this.handleMethod = handleMethod;
    }

    @Override
    public String toString() {
        return "ControllerMapping{" +
                "controllerClass=" + controllerClass.getSimpleName() +
                ", handleMethod=" + handleMethod.getName() +
                '}';
    }
}
